<?php
if (array_key_exists('wsdl', $_GET)) {
    header("Content-Type:text/xml");
    echo file_get_contents('noapi.wsdl');
    exit();
}
ini_set("memory_limit", "64000000");
require_once('./class/config.php');
require_once(SITE_PATH . '/class/DB/db_config.php');

$classMap = array(
    'SupplierChange' => 'Client_NO2_SupplierChange',
    'Client' => 'Client_NO2_Client',
    'ES' => 'Client_NO2_ES',
    'QualitySeries' => 'Client_NO2_QualitySeries',
    'LoadProfile' => 'Client_NO2_LoadProfile',
    'TimePeriod' => 'Client_NO2_TimePeriod',
    'SupplierChangeResponse' => 'Client_NO2_SupplierChangeResponse',
    'QualitySeriesResponse' => 'Client_NO2_QualitySeriesResponse',
    'LoadProfileResponse' => 'Client_NO2_LoadProfileResponse'
);

$options = array('classmap' => $classMap);
$server = new SoapServer('noapi.wsdl', $options);
$server->setClass('NOApi', $dataBase);
$server->handle();
